package org.example.petsystem.service.impl;

import org.example.petsystem.entity.ResultBody;
import org.example.petsystem.mapper.UserCommentMapper;
import org.example.petsystem.service.UserCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserCommentServiceimpl implements UserCommentService {
    @Autowired
    private UserCommentMapper userCommentMapper;
    @Override
    public ResultBody addComment(String code, String comment, double point) {
        if(userCommentMapper.addComment(code,comment,point)>0)
        {
            return new ResultBody(200,"评论成功",true);
        }
        return new ResultBody(500,"评论失败",false);
    }
}
